package com.weiweb.action;
import com.weiweb.common.SessionConstant;
import com.weiweb.service.IUserService;


public class RedirectAction extends BaseAction{
	/**
	 * 
	 */
	private String url=null;
	private int type=0;
	private static final long serialVersionUID = 4890875936426441894L;
	public IUserService userService;



	public String execute() {
		type=userService.getRedirectType(session);
		if(type!=0) {
			url=(String)session.get(SessionConstant.SESS_REDIRECT);
			url=url.substring(0,url.lastIndexOf("$"));
		}
		return "success";
	}
	
	
	public int getType() {
		return type;
	}


	public void setType(int type) {
		this.type = type;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public IUserService getUserService() {
		return userService;
	}


	public void setUserService(IUserService userService) {
		this.userService = userService;
	}
	
	
	
}